// pages/coupon/coupon.js
Page({
  data: {
    currentTab:0,
    couponI:'../img/coupon/coupon.png',
    couponG:'../img/coupon/ygq.png',
    couponY: '../img/coupon/ysy.png',
    change:'../img/coupon/change.png',
    coupon:[{
      money:30,
      condition:'购满399元使用',
      time:'使用时间：2017.10.1-2017.12.31'  
    },{
        money: 20,
        condition: '购满299元使用',
        time: '使用时间：2017.10.1-2017.12.31'  
    }]
  },
  onLoad(){
    wx.setNavigationBarTitle({
      title: '我的优惠券'
    })
    var page = this;
    wx.getSystemInfo({
      success: function (res) {
        console.log(res);
        page.setData({ winWidth: res.windowWidth });
        page.setData({ winHeight: res.windowHeight });
      }
    })
  },
  switchNav: function (e) {
    var id = e.currentTarget.id;
    this.setData({ currentTab: id });
  },
  change(e){
    wx.navigateTo({
      url: '../signin/signin',
    })
  }
})